unit frm_ShowDecodeRaspred;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, shbl_Card, PropFilerEh, ExtCtrls, StdCtrls, DBCtrls, GridsEh,
  DBGridEh, PropStorageEh, ActnList, ComCtrls, ToolWin, Buttons, DB,
  FIBDatabase, pFIBDatabase, FIBDataSet, pFIBDataSet;

type
  TfrmShowDecodeRaspred = class(TshblCard)
    dbgDecodingList: TDBGridEh;
    dbmDecode: TDBMemo;
    Splitter1: TSplitter;
    ds_DecodingList: TpFIBDataSet;
    LocalTrans: TpFIBTransaction;
    dsc_DecodingList: TDataSource;
    ds_DecodingListACT_ID: TFIBIntegerField;
    ds_DecodingListGROUP_ID: TFIBIntegerField;
    ds_DecodingListNAME: TFIBStringField;
    ds_DecodingListDOCDATE: TFIBDateTimeField;
    ds_DecodingListDECODE_TEXT: TFIBMemoField;
    ds_DecodingListPMONTH: TFIBSmallIntField;
    ds_DecodingListPYEAR: TFIBSmallIntField;
    procedure aCancelExecute(Sender: TObject);
    procedure dbmDecodeKeyUp(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmShowDecodeRaspred: TfrmShowDecodeRaspred;

procedure ShowDecodeRaspred (PAct_id :integer; aOwner :TComponent);

implementation

uses uDM, uMAIN;

{$R *.dfm}

procedure ShowDecodeRaspred (PAct_id :integer; aOwner :TComponent);
begin

  frmShowDecodeRaspred := TfrmShowDecodeRaspred.Create(aOwner);

  frmShowDecodeRaspred.ds_DecodingList.ParamByName ('pact_id').Value := PAct_id;

  frmShowDecodeRaspred.ShowModal;

  FreeAndNil (frmShowDecodeRaspred);

end;

procedure TfrmShowDecodeRaspred.aCancelExecute(Sender: TObject);
begin
  ModalResult := mrCancel;

end;

procedure TfrmShowDecodeRaspred.dbmDecodeKeyUp(Sender: TObject;
  var Key: Word; Shift: TShiftState);
begin
  if (Key = Ord('A')) and (Shift = [ssCtrl]) then
    dbmDecode.SelectAll;

end;

procedure TfrmShowDecodeRaspred.FormShow(Sender: TObject);
begin
  ds_DecodingList.Open;

end;

end.
